package Thread;

import java.sql.SQLOutput;

public class SleepDemo2 {
    public static void main(String[] args) {
        Thread lin=new Thread(){
            public void run(){
                System.out.println("林在睡觉");
                try {
                    Thread.sleep(5000000);
                } catch (InterruptedException e) {
                    System.out.println("林：干嘛呢干嘛呢");
            }
                System.out.println("醒了");
        }
        };
        Thread huang=new Thread(){
            public void run(){
                for (int i=0;i<5;i++){
                    System.out.println("黄大锤：80！");
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {

                    }
                }
                System.out.println("墙通了");
                lin.interrupt();
            }

        };
        lin.start();
        huang.start();

    }
}
